import axios from './request'
// let baseUrl='http://localhost:3000'
// 获取轮播图数据的api
// 0:pc 1:android 2:iphone 3:ipad
export function getBanner(type=1){
  return axios.get(`/banner?type=${type}`)
}
//推荐歌曲歌单,可选参数 ：limit：取出数量，默认为10
export function getMusic(limit){
  return axios.get(`/personalized?limit=${limit}`)
}
//获取歌单详情
export function getPlayListDetail(id,limit){
  return axios.get(`/playlist/detail?id=${id}&limit=${limit}`)
}
//获取歌曲详情
export function getMusicDetail(ids){
  return axios.get(`/song/detail?ids=${ids}`)
}
//获取歌词
export function getLyric(id){
  return axios.get(`/lyric?id=${id}`)
}
//搜索
export function searchMusics(keyword){
  return axios.get(`/search?keywords=${keyword}`)
}
//搜索建议
export function searchAdvice(keyword){
  return axios.get(`/search/suggest?keywords=${keyword}&type=mobile`)
}
//手机登录
export function phoneLogin(phone,password){
  return axios.get(`/login/cellphone?phone=${phone}&password=${password}`)
}
//榜单查询
export function getTopList(){
  return axios.get(`/toplist/detail`)
}
//获取每日推荐歌曲
 //说明 : 调用此接口 , 可获得历史日推可用日期列表
export function getEveryDayRecommend(){
  return axios.get(`/recommend/songs`)
}

//最新专辑
export function getNewestAlbum(){
  return axios.get(`/album/newest`)
}
//获取精品歌单 cat: tag, 比如 " 华语 "、" 古风 " 、" 欧美 "、" 流行 ", 默认为 "全部",
export function getGoodsPlayList(cat,limit){
  return axios.get(`/top/playlist/highquality?cat=${cat}&limit=${limit}`)
}
